Skip to main content

Deployment

Project Extraction

  • First you have to extract the whoxa.zip then you will get three zip files.

    • whoxa_admin.zip
    • whoxa_frontend.zip
    • whoxa_backend.zip

Config file

  • Make a config.json inside config folder of Project And add following content as per your PostgreSQL and Server Configuration

    {
    "development": {
    "username": "root",
    "password": "",
    "database": "whoxa",
    "host": "127.0.0.1",
    "dialect": "postgres"
    },
    "test": {
    "username": "root",
    "password": null,
    "database": "database_test",
    "host": "127.0.0.1",
    "dialect": "postgres"
    },
    "production": {
    "username": "root",
    "password": null,
    "database": "database_production",
    "host": "127.0.0.1",
    "dialect": "postgres"
    }
    }

Backend ENV file configurations

  • Make a .env file in the project on folder which contain package.json with following content.
  • If you already have .env file then only change below values, other values will be same.
TWILIO_AUTH_TOKEN=""
TWILIO_FROM_NUMBER=""
TWILIO_ACCOUNT_SID=""
baseUrl="http://localhost:3000/"

Frontend — Required Environment Variables

Create a .env file in the frontend project root. Key variables to configure:

VariableDescription
VITE_API_URLBackend API base URL
VITE_SOCKET_URLBackend Socket.IO URL
VITE_META_APP_IDMeta App ID for Embedded Signup
VITE_META_CONFIG_IDMeta Config ID for Embedded Signup flow
VITE_Google_MAP_KEYGoogle Maps API key
VITE_GOOGLE_CLIENT_IDGoogle OAuth Client ID
VITE_RAZORPAY_KEY_IDRazorpay public key for payment modal
VITE_GIPHY_API_KEYGiphy API key
VITE_IS_DEMOSet to false for live deployments

Server Starting

  • Open Terminal on the location where package.json is located.
  • Run following command to install dependencies
npm install
  • After successful running of npm install install global dependency to auto configure the DB related tasks by running following command.
npm install -g sequelize sequelize-cli
  • To run server run following command within the terminal where package.json is located.
npm run dev

Peer JS Installation

  • Install PeerJS globally
npm install -g peer
  • Run following command to run peer server on port 4001
peerjs --port 4001

Frontend Build & Deployment

Step 1: Update the .env File

Navigate to the frontend project root directory, open the .env file, update the required configuration values, and save.


TIPS:

Make sure all environment variables are correctly defined before proceeding to the next step.


Step 2: Install Dependencies & Create a Production Build

Open a terminal inside the frontend project root directory.

Run the following command to install dependencies:

yarn install

Run the following command to start the development server:

yarn dev

Or run the following command to create a production build:

yarn build

After the build process is completed, a dist folder will be generated. Verify that all the compiled files are available inside the dist folder.

Select all files inside the dist folder and create a .zip file containing those files.

Step 3: Replace Frontend Files in Backend Project

  1. Go to your backend project directory.
  2. Locate the folder named frontend.
  3. Delete all existing files inside the frontend folder.
  4. Upload the newly created frontend .zip file into the backend project.
  5. Extract (unzip) the files inside the frontend folder.
  6. After extraction, all new build files should be present inside the backend frontend folder.

Step 4: Restart the Backend Project

npm run dev

Production Checklist

ItemAction Required
HTTPSSSL certificate on both frontend and API domains
Environment variablesAll secrets in .env — never hardcoded or committed to git
NODE_ENVSet to production in backend .env
IS_CLIENTSet to true to disable demo guard and enable all mutations
Database backupsSet up automated PostgreSQL backups
Redis persistenceEnable Redis AOF/RDB persistence
Meta webhook URLMust be HTTPS and publicly reachable
Stripe webhookRegister API URL in Stripe dashboard
Razorpay webhookRegister API URL in Razorpay dashboard
File uploadsEnsure upload directory has write permissions
FirewallOnly ports 80, 443, 22 open publicly — DB and Redis on localhost only

Update / Redeploy

Backend:

  1. Pull the latest code.
  2. Run npm install to update dependencies.
  3. Run database migrations if required.
  4. Restart the server.

Frontend:

  1. Pull the latest code.
  2. Run yarn install to update dependencies.
  3. Run yarn build to create a new production build.
  4. Replace the frontend folder in the backend project with the new dist files.
  5. Restart the backend server.

Vercel Deployment (Frontend Only)

The frontend can be deployed to Vercel:

  1. Import the frontend repo in Vercel.
  2. Set all VITE_* environment variables in Vercel project settings.
  3. Build command: yarn build
  4. Output directory: dist
  5. Vercel handles HTTPS and CDN automatically.

The backend must still be deployed on a server because it requires PostgreSQL, Redis, and persistent file storage.


Open Webpages

Frontend will be at

http://{your_server_ip}:{port_on_which_server_is_running}/

Admin Panel will be at

http://{your_server_ip}:{port_on_which_server_is_running}/admin

Docusaurus logo

First-Run Admin Login

There are no hardcoded default credentials. You set your own admin email and password in .env before first boot:

ADMIN_EMAIL=admin@yourdomain.com
ADMIN_PASSWORD=YourStrongPassword123!

The server creates the admin account automatically on first start using these values.
Log in at http://{your_server_ip}:{port}/admin with the email and password you set.

Change your password immediately after first login via Admin Panel → Profile Settings.

Default User Login Credentials
  • email:
alicejohn@yopmail.com
  • password:
123456